package com.czh.client;

import com.czh.entity.User;
import com.czh.proxy.ClientProxy;
import com.czh.api.UserService;

/**
 * @author chenzhihua
 * @desc TODO
 * @date 2024/1/9
 * @Version V1.1.0
 */
public class RpcClient_02 {
    public static void main(String[] args) {
        ClientProxy clientProxy = new ClientProxy("127.0.0.1",8899);
        UserService proxy = clientProxy.getProxy(UserService.class);
        System.out.println(proxy.getUserById(10));

        User user = User.builder().userName("法外狂徒张三").sex(Boolean.TRUE).id(888).build();
        proxy.insertUser(user);
        System.out.println("插入成功" + user);
    }
}
